// component/s-hot-goods/index.js
Component({

    /**
     * 页面的初始数据
     */
    properties: {
        theme: Object
    },

    observers: {
        "theme": function (theme) {
            if (!theme) {
                return
            }
            if (theme.length <= 0) {
                return
            }

            let bannerLeft = theme.items.find(t=>t.name === "left");
            let bannerRightTop = theme.items.find(t=>t.name === "right-top");
            let bannerRightBottom = theme.items.find(t=>t.name === "right-bottom");
            this.setData({
                bannerLeft,
                bannerRightTop,
                bannerRightBottom
            })
        }
    },

    /**
     * 组件的初始数据
     */
    data: {
        bannerLeft: {},
        bannerRightTop: {},
        bannerRightBottom: {}
    },

    /**
     * 组件的方法列表
     */
    methods: {}
});